package com.sinothk.QRCode.demo;

import android.content.Intent;
import android.widget.Toast;

import com.google.zxing.Result;
import com.sinothk.QRCode.ScanerCode.ScanCodeBaseActivity;

public class QrScanActivity extends ScanCodeBaseActivity {

    @Override
    protected void onScanReturn(Result result) {
        if (result != null) {
            Intent intent = getIntent();
            intent.putExtra("value", result.getText());
            setResult(200, intent);
            finish();
        } else {
            Toast.makeText(QrScanActivity.this, "识别有误", Toast.LENGTH_SHORT).show();
        }
    }
}
